<%@ Page Title="Information Management System" Language="C#" MasterPageFile="~/Dialog.Master" AutoEventWireup="true"
    CodeBehind="ConditionDetail.aspx.cs" Inherits="CARMS.Admin.ConditionDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table>
     <tr>
            <td>
                <asp:Label ID="Label1" runat="server" Text="Menu Name"></asp:Label>
            </td>
            <td>
                <asp:DropDownList runat="server" ID="dplPageName">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label231" runat="server" Text="Data Table Name"></asp:Label>
            </td>
            <td>
              <asp:DropDownList runat="server" ID="dplTableName"></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Button ID="Button1" runat="server" Text="Get Table Colulmns " OnClick="btnGenerateColumns_Click"
                    SkinID="Button150" />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Label ID="Label2" runat="server" Text="Table Colulmns Selected for Search Condition"></asp:Label>
            </td>
        </tr>
        <tr>
             <td colspan="2">
                <asp:GridView runat="server" ID="gridColumns" AutoGenerateColumns="false" ShowFooter="false"
                    OnRowDataBound="gridColumns_OnRowDataBound" OnRowCommand="gridColumns_OnRowDataBound">
                    <Columns>
                        <asp:TemplateField HeaderText="Column Name">
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="txtName" Text='<%#Eval("ColumnName") %>' MaxLength="50" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Title">
                            <ItemTemplate>
                                <asp:TextBox runat="server" ID="txtTitle" Text='<%#Eval("ColumnName") %>' MaxLength="50" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Column Type">
                            <ItemTemplate>
                                <asp:DropDownList runat="server" ID="dplColumnType" AutoPostBack="true" OnSelectedIndexChanged="dplColumnType_OnSelectedIndexChanged"  Width="100px">
                                </asp:DropDownList>
                                <asp:DropDownList runat="server" ID="dplPulicCategory" Visible="false" Width="100px">
                                </asp:DropDownList>
                                <asp:Panel runat="server" ID="panelRelativeTable" Visible="false">
                                    <table cellpadding="5" border="0">
                                        <tr>
                                            <td>
                                                Table
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtRelativeTableName" MaxLength="50" Width="60px">
                                                </asp:TextBox>
                                            </td>
                                            <td>
                                                Column
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtRelativeColumnName" MaxLength="50" Width="60px">
                                                </asp:TextBox>
                                            </td>
                                              <td>
                                                Search
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtRelativeSearchColumnName" MaxLength="50" Width="60px">
                                                </asp:TextBox>
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Sort Index">
                            <ItemTemplate>
                                <asp:TextBox runat="server" ID="txtSortIndex" Width="50px" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </td>
        <tr>
            <td>
            </td>
            <td>
                <asp:Button runat="server" Text="Save" OnClick="btnSaveColumns_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
